import { useSearchParams, usePathname } from 'next/navigation';

const getPathAndQuery = () => {
  const searchParamsStr = useSearchParams().toString()
  const pathname = usePathname()
  return encodeURIComponent(`${pathname}?${searchParamsStr}`)
}
export default getPathAndQuery 